{{define "book/book_list.tmpl"}}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>书籍列表</title>
</head>
<body>

<div><a href="/book/new">添加新书</a></div>

<table border=1>
    <thead>
    <tr>
        <th>ID</th>
        <th>title</th>
        <th>price</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {{range .data }}
    <tr>
        <td>{{.ID}}</td>
        <td>{{.Title}}</td>
        <td>{{.Price}}</td>
        <td>
            <a href="/book/delete?id={{.ID}}">删除</a>
            <a href="/book/edit?id={{.ID}}">编辑</a>
        </td>
    </tr>
    {{end}}
    </tbody>
</table>
</body>
</html>
{{end}}